package LinkDB;

import java.sql.DriverManager;
import java.sql.SQLException;
import javax.swing.JOptionPane;

public class LinkDB {

    public static java.sql.Connection getConexao() {
        try {
            Class.forName("com.mysql.jdbc.Driver");
            return DriverManager.getConnection("jdbc:mysql://localhost/chelp", "jorge", "isabelamaria");
        } catch (ClassNotFoundException | SQLException e) {
            String errorMsg = "Driver nao encontrado";
            JOptionPane.showMessageDialog(null, errorMsg + ":\n" + e);
        }
        return null;
    }
}
